package com.hwadee.JPKC.service.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.hwadee.JPKC.dao.courseDeclareMapper;
import com.hwadee.JPKC.entity.courseDeclare;
import com.hwadee.JPKC.service.CourseDeclareService;

@Service
public class CourseDeclareServiceImpl implements CourseDeclareService {
	
	@Autowired
	private courseDeclareMapper courseDeclaremapper;

	@Override
	public List<courseDeclare> FindPage() {
		// TODO Auto-generated method stub
		return courseDeclaremapper.getAll();
	}

	@Override
	public int Update(courseDeclare coursedeclare1) {
		// TODO Auto-generated method stub
		return courseDeclaremapper.updateByPrimaryKeySelective(coursedeclare1.getSerialNumber());
	}

	@Override
	public int insertKc(courseDeclare coursedeclare) {
		// TODO Auto-generated method stub
		return courseDeclaremapper.insert(coursedeclare);
	}

	@Override
	public courseDeclare select(int serialNumber) {
		// TODO Auto-generated method stub
		return courseDeclaremapper.selectByPrimaryKey(serialNumber);
	}

	@Override
	public List<courseDeclare> selectUserId(Integer userId) {
		// TODO Auto-generated method stub
		return courseDeclaremapper.selectUserId(userId);

	}

	@Override
	public int updateByPrimaryKey(courseDeclare coursedeclare) {
		// TODO Auto-generated method stub
		return courseDeclaremapper.updateByPrimaryKey(coursedeclare);
	}

	@Override
	public int updateByPrimaryKeySelective(courseDeclare coursedeclare) {
		// TODO Auto-generated method stub
		return courseDeclaremapper.updateByPrimaryKeySelective(coursedeclare);
	}

	@Override
	public int deleteByPrimaryKey(Integer serialNumber) {
		// TODO Auto-generated method stub
		return courseDeclaremapper.deleteByPrimaryKey(serialNumber);
	}

	

}
